﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DEsbInterface;
using System.ServiceModel;
using System.Transactions;

namespace DEsbServices
{
    [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
    public class UserServiceImpl: IUser
    {
        [TransactionFlow(TransactionFlowOption.Allowed)]
        [OperationBehavior(TransactionScopeRequired=true)]
        public string GetUserName(string arg1, string arg2, string arg3)
        {
            throw new Exception("fffffffffff");

            Console.WriteLine("GetUserName");
            if (Transaction.Current != null && Transaction.Current.TransactionInformation != null)
            {
                Console.WriteLine("           DistributedIdentifier: " + Transaction.Current.TransactionInformation.DistributedIdentifier);
                Console.WriteLine("           LocalIdentifier: " + Transaction.Current.TransactionInformation.LocalIdentifier);
            }
            else
            {
                Console.WriteLine("           No Transaction");
            }
            return "222";
        }
    }
}
